﻿using DemoApp.Properties;
using DemoApp.ViewModel;
using MvvmFoundation.Wpf;

namespace DemoApp.CustomerModule.ViewModel
{
    public class ViewAllCustomersViewModel : CommandViewModel
    {
        private readonly IMainWindowViewModel _mainWindowViewModel;

        public ViewAllCustomersViewModel(IMainWindowViewModel mainWindowViewModel)
            : base(Strings.MainWindowViewModel_Command_ViewAllCustomers)
        {
            _mainWindowViewModel = mainWindowViewModel;

            Command = new RelayCommand(ShowAllCustomers);
        }

        private void ShowAllCustomers()
        {
            _mainWindowViewModel.AddWorkspace<AllCustomersViewModel>();            
        }
    }
}